from noatin import *
global network
network = NoatinConnection(1500)
def handler(msg):
    print msg.msgtype, msg.name, msg.value, '1'
    network.noatin_message_send(0,'title',1,'')
network.register_message_handler('1', '17', handler)
def handler(msg):
    print msg.msgtype, msg.name, msg.value, '2'
    network.noatin_message_send(0,'title','content','')
network.register_message_handler('1', '17', handler)
network.start()
while True:
    network.loop_recive_messages()